package CreationModel.AbstractFactoryModel;

/**
 * @author 王蕾 [wanglei_dev@cyou-inc.com]
 * @date 2017-11-23 11:19:00
 */
public interface IDepartment {

    void insert(IDepartment department);

    IDepartment getDepartment(int id);

}

class SqlServerDepartment implements IDepartment{

    @Override
    public void insert(IDepartment department) {
        System.out.println("在SQL Server 中给部门添加一条记录");
    }

    @Override
    public IDepartment getDepartment(int id) {
        System.out.println("在SQL Server 中根据ID获取到一条部门信息");
        return  null;
    }
}

class AccessServerDepartment implements IDepartment{

    @Override
    public void insert(IDepartment department) {
        System.out.println("在Access 中给部门添加一条记录");
    }

    @Override
    public IDepartment getDepartment(int id) {
        System.out.println("在Access 中根据ID获取到一条部门信息");
        return  null;
    }
}
